/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * InternalFrame.java
 *
 * Created on 11/03/2012, 04:28:35 PM
 */
package co.edu.eam.clinica.vista.gui.common;

import javax.swing.JPanel;

/**
 *
 * @author Camilo Andres
 */
public class InternalFrame extends javax.swing.JInternalFrame {

    private JPanel panel;
    /** Creates new form InternalFrame */
    public InternalFrame(PanelOncologos panel) {
        initComponents();
        panel.setVentana(this);
        this.panel=panel;
        setIconifiable(true);
        setClosable(true);
        setMaximizable(false);
       
        //setContentPane(panel);
        
        getContentPane().add(panel);
        panel.setBounds(0, 0, panel.getPreferredSize().width, panel.getPreferredSize().height);
        System.out.println(panel.getPreferredSize());
        setSize((10+panel.getPreferredSize().width), panel.getPreferredSize().height+50);
        System.out.println("tama�ano palenl:"+panel.getPreferredSize().toString());
        setVisible(true);
        setResizable(true);
        setTitle(panel.getTitulo());
               
        
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        getContentPane().setLayout(null);

        pack();
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    // End of variables declaration//GEN-END:variables
}
